package com.yhs.best;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;


public class Guide extends Activity {
	TextView data;
	Button but;
	int cat, tip, gui;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.guide);
		data = (TextView) findViewById(R.id.tvGuide);
		
		Bundle b = getIntent().getExtras();
		tip = b.getInt("tipe");
		gui = b.getInt("guide");
		
		try{
			InputStream is = getResources().getAssets().open("/1/"+tip+"/"+gui+".html");
			      InputStreamReader ir = new InputStreamReader(is);
			      BufferedReader br = new BufferedReader(ir);
			      String line;
			      while((line = br.readLine()) != null){
			    	  data.append(Html.fromHtml(line));
			      }
			
		} catch (FileNotFoundException e){
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();}
		}
			
	}